Calculus in Case You Forgot

Steven Dutch, Professor Emeritus, Natural and Applied Sciences,University of Wisconsin - Green Bay


All You Need to Know

Calculus is a subject that is way harder than it needs to be. Thethree things you need to know about calculus are:

The math below can be a bit tedious but it never involves anything beyondalgebra and trigonometry.

Derivatives

A derivative is the slope of a curve. Consider the curve y = x2.What's the slope of the curve at some value of x? We can solve this problemgeometrically, but for a lot of other curves we can't, so we find the slope of aline between two points and see what happens as the distance becomes smaller andsmaller. Consider two points, x and x + h. The corresponding y values are x2 and (x+h)2, or x2+2hx + h2. Let's call the xdistance dx, and the y distance dy. Then dx = (x+h)-x = h, and dy = (x2+2hx + h2 )-x2 = 2hx + h2

Thus the slope is the change in y divided by the change in x, or dy/dx = 2hx + h2 /h= 2x + h. A derivative of zero means the curve has zero slope (its tangent ishorizontal).

Now here's the good part about calculus. What happens when h becomes verytiny? If x = 3, say, and h is 0.000001, we can pretty much ignore h. So the limitof the slope as h becomes very tiny is 2x. If you plot the curve y = x2,the slope at x = 1 is 2, the slope at x=2 is 4, and so on. The tangent at x=2will pass through (1,0), (2,4) and (3,8). Try it and see.

If we can ignore h as it becomes very small, then h2 , h3 ,h4 and so on become tiny even faster. In many cases, when higherpowers of h turn up in an approximation, we can ignore them entirely. This worksif:

We can apply the method above to find the derivative of any power of x. Thederivative of xn is found by finding the limit of  ((x+h)n-xn)/h. The binomial expansion of (x+h)n = xn +nhxn-1 + terms with higher powers of h that we can ignore if hbecomes extremely tiny. So the limit becomes (xn + nh xn-1- xn )/h = ( nh xn-1 )/h = nxn-1. Thederivative of xis nxn-1 (for any n, evennegative).

Derivatives and Constants

What's the derivative of a constant? A constant has the same value for all x,so the limit of (c - c)/h is obviously zero. Also a constant plots as thehorizontal line y = c, and obviously has zero slope. So the derivative of aconstant is zero. 

What's the derivative of a constant times a function? The derivative of f(x)is the limit of ((f(x+h)-f(x))/h as h becomes very small. The derivative of cf(x)is the limit of ((cf(x+h)-cf(x))/h = c((f(x+h)-f(x))/h. So the derivative ofa constant times a function is the constant times the derivative of thefunction.

Derivatives of Other Functions

We can apply the approximation method to other functions as well. Forexample, what's the derivative of sin(x)? We find the limit of (sin(x+h)-sin(x))/h.This equals (sin(x)cos(h)+cos(x)sin(h)-sin(x))/h. Now as h gets very tiny, cos(h)approaches 1 and sin(h) approaches h. So for very tiny h, the limitbecomes 
(sin(x)+h cos(x)-sin(x))/h = h cos(x)/h = cos(x). Thus, the derivative of sin(x)is cos(x). In other words, at x = 0, where the sine curve is at its steepest,the slope is cos(0) = 1, and at 90 degrees, where the sine curve reaches maximumand starts to decrease, the slope is cos(90) = 0.

For the logarithm function, we find the limit of (log(x+h)-log(x))/h. Thiscan be rewritten as log((x+h)/x)/h = log(1+h/x)/h. As h/x becomes tiny,log(1+h/x) approaches h/x. So the derivative of log(x) = (h/x)/h = 1/x. 

For the exponential function, we find the limit of (exp(x+h)-exp(x))/h. Thiscan be rewritten as (exp(h)exp(x)-exp(x))/h = (exp(x)(exp(h)-1)/h. As h becomestiny, exp(h) approaches 1, but if h is not zero, exp(h) is actually a bitlarger. For very tiny h, exp(h) is very nearly 1+h. Thus, for very small h, thelimit becomes exp(h)(1+h-1)/h = exp(x)h/h = exp(h). The exponential functionis its own derivative.

Can it really be this simple? Well, yes it is, once you eliminate theformal junk that clutters the average calculus text and get down to findingresults. Formal mathematics is important. So is fixing jet engines, but youdon't need to be a trained aviation mechanic to fly a plane.

Notation

There are two ways of writing derivatives. One way emphasizes the slopedefinition: dy/dx means change in x divided by change in y. Althoughmathematical purists insist dy/dx is not a fraction, most of the time you canregard it as one. But dx and dy are single units: dx does not mean d times x, soyou can't cancel the d's to get y/x.

The other notation treats derivatives as a function. The derivative of f(x)can be written f'(x). This is sometimes more compact and neater than dy/dx.

Combinations of Functions

What's the derivative of f(x) + g(x)? Here, we need to find the limit of (f(x+h)+ g(x+h) - f(x) - g(x))/h as h becomes very small. It's easy to see we canrearrange terms to get (f(x+h) - f(x))/h + (g(x+h) - g(x))/h. This is just thesum of the two derivatives. It's easy to see that subtraction works the sameway. So:

How about products? What is the derivative of f(x)g(x)? We're trying to findthe limit of 
[f(x+h)g(x+h) - f(x)g(x)]/h. Now f'(x) is the slope of f(x), so for tiny h,f(x+h) = f(x) + hf'(x). So we can rewrite as follows:

Quotients are harder. The derivative of f(x)/g(x) is the limit of [f(x+h)/g(x+h)-f(x)/g(x)]/has h becomes very small. We obtain (the math is simple but pretty busy).

How about functions of functions? What's the derivative of f(g(x)? It's thelimit of [f(g(x + h)) - f(g(x))]/h as h becomes very small, or [f(g(x)+hg'(x))-f(g(x))]/h.Now f(g(x)+hg'(x)) is f(g(x) plus a tiny increment, so we can approximate it asf(g(x) + f'(g(x))hg'(x). Thus the limit can be written [f(g(x) + f'(g(x))hg'(x) -f(g(x))]/h, or  f'(g(x)hg'(x)/h = f'(g(x))g'(x). This is called the ChainRule.

Higher Derivatives

You can take a derivative of a derivative. The derivative of y = xn is nxn-1 . The derivative of nxn-1 is n(n-1)xn-2,and so on. That second derivative is called, well, a second derivative. Thesecond derivative of y = f(x) can be written d2y/dx2 , oras f''(x). Third and higher derivatives are similarly defined.

Second derivatives are useful because they indicate whether a curve is convexupward (positive second derivative) or down (negative). If the second derivativeis zero, the curve is switching from one curvature to the other and is at an inflectionpoint. Second derivatives also crop up in the formulas for radius ofcurvature of curves. Third and higher derivatives are rarely used.

Integrals

What's the area under the curve y = x? Its graph is a straight line with aslope of 45 degrees, so the area is a right triangle of length and altitude x.Thus the area (integral) is x2/2.

How about x2 ? Imagine we divide the area under the curve from 0to x into tiny strips of width h. The area will be the sum of the strips, orArea = 0h +  hh2 + h(2h)2 + h(3h)2 +h(4h)2 + ..... h(nh) where n is the total numberof strips. Here we can't just assume all the terms are negligible because thereare so many. Obviously Area = h3(0 +  12 + 22 + 32 + 42 + ..... n2 ). Now all we need is aformula for the sum of squares, which happens to be n(n+1)(2n+1)/6. If h is verytiny, n will be very large, so the sum of squares from 0 to n will be verynearly 2n3/6 =  n3/3. So the area is given by Area = h3n3/3. But n is the number of strips from 0 to x,so n = x/h. Thus Area = h3(x/h)3/3 = x3/3. 

It looks like there's a pattern here. We might suspect (correctly, it turnsout) that the area under y = xn is x(n+1)/(n+1). But theapproximation method gets pretty clumsy as n gets large, and in any case, wewant a general formula for all values of n. We need a better way. Fortunately,there is one. Much better.

Antiderivatives

Consider the area under a curve y = f(x). We can find it, in principle, bydividing the area under the curve into strips of width h. So Area(x) = sum ofstrips at x=0, x=h, x=2h, etc. What's Area(x+h)? It's obviously Area(x) + f(x)h(in other words, Area(x) plus a strip h wide and f(x) high). So we haveArea(x+h)-Area(x) = hf(x), or (Area(x+h)-Area(x))/h = f(x). The derivative ofthe area (integral) is just the original function. Taking derivatives(differentiation) and integration are inverse operations. This fact is soimportant it is called the Fundamental Theorem of Calculus.

This makes life very simple. To find the integral of  xn wehave to find something whose derivative is xn . The derivative of x(n+1)is obviously (n+1)xn, so the only thing separating us from that goalis the coefficient (n+1). We try the derivative of  x(n+1)/(n+1)and get (n+1)xn/(n+1) = xn. Thus the integral of xnis x(n+1)/(n+1).

Note however, that if k is some constant, the derivative of k + x(n+1)/(n+1)also equals xn, since the derivative of a constant is zero. Strictlyspeaking, the integral of any function is always a formula plus a constant,called the constant of integration. Most of the time the constant is zeroand it is usually omitted from tables of integrals. But sometimes it is not. Itsvalue is determined by the problem you're trying to solve. 

Imagine trying to sum the strips under y = 1/x. But we know from above thatthe derivative of the log function is 1/x. Hence, the integral of 1/x islog(x). And since the derivative of exp(x) = exp(x), obviously theintegral of exp(x) = exp(x).

In general, integration is a lot harder than differentiation. You can find aderivative for all but the most extremely oddball functions. There are a lot offunctions for which there is no neat integral (although there are numericalmethods that will give approximations). The integral of the sum of two functionsis the sum of the integrals, but beyond that there are no neat formulas forproducts of functions, functions of functions, etc.

Notation

The conventional integral sign looks like a long skinny S - and it is, for "summation." The integral of a function is usually written ∫ f(x)dx, where the dx term represents the width of the narrow stripsunder the curve. An integral written in general terms like that is called an indefiniteintegral. To get actual numerical results, evaluate the integral formulaat each end of the desired range and take the difference. We write such aformula with subscripts and superscripts to show the limits of integration. Suchan integral is called a definite integral.

For example ∫ x3 dx = x4 /4 (indefiniteintegral). The area under the curve y = x3 from x = 2 to x = 4 is 
24 x3 dx = 44 /4 - 24 /4= 256/4 - 16/4 = 64 - 4 = 60. This is a definite integral.

You can't just apply integration blindly. If the curve drops below y = 0, theintegral of that part of the curve becomes negative. If you try integrating y = x3 from -3 to 3, you'll get zero. That may or may not be what you want. If you wantto know how much paint it would take to cover the area between the x axis andthe curve, it's not. You'd need to integrate separately from -3 to 0 and from 0to 3. If you were to try integrating y = 1/x2  from -2 to 5, theintegration would work just fine. You'd never suspect that the curve goes toinfinity at x = 0. That's called improper integration.

How to Find Integrals

All You Really Need to Know About Multivariate Calculus

If you are familiar with calculus in two dimensions, calculus in three ormore dimensions is a piece of cake. All you really need to know is this:

Let's say you want to differentiate z = x3 + 3x2y2 + 2y4 with respect to x.The actual d symbol used in multivariate calculus looks like a backwards 6. We take each term one at a time. (x3)/x = 3x2 , (3x2y2)/x = 3(2x)y2,because we're only concerned with x and we treat all the other terms, even thoseinvolving y, as constant,  and (2y4 )/x = 0, since as far asx is concerned, it's a constant. Hence the final result is 3x2 +6xy2.

Now suppose to want to find the volume under z = x3 + 3x2y2 + 2y4.The first step is to integrate with respect to one variable, say x. It doesn'tmatter what order you do the operations in, except that the algebra may besimpler one way than another. Integrating with respect to x we get  x4/4+ 3(x3/3)y2 + (2y4)x. Note that the y terms aretreated as constants. We simplify to x4/4 + x3y2 + 2y4xand integrate with respect to y. Now we treat all the x terms as constants andget (x4/4)y + x3(y3/3)+ 2(y5/5)x.Try it in reverse order, integrating first with respect to y and next withrespect to x to verify that the results are the same.


Access Crustal Movements Notes Index
Return to Techniques Manual Index

Return to Professor Dutch's Home Page
Created 21 August 2000, Last Update 24 May 2020.